/**
 * 
 */
package com.google.code.cisx.wfe.events;

import com.google.code.cisx.wfe.model.Transition;

/**
 * @author <a href='mailto:rthakur@bravurasolutions.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id$
 */
public class TransitionEvent extends TypedEvent<Transition> {

    public enum TransitionEventType implements EventType {

        /**
         * Implies that the Transition has been enabled.
         */
        TRANSITION_ENABLED("Transition Enabled"),

        /**
         * Implies that the Transition has been disabled.
         */
        TRANSITION_DISABLED("Transition Disabled"),

        /**
         * Implies that the Transition has fired or started.
         */
        TRANSITION_FIRED("Transition Fired"),

        /**
         * Implies that the Transition has finished is processing/execution.
         */
        TRANSITION_COMPLETED("Transition Completed");

        /**
         * Event type as String
         */
        private String type;

        /**
         * @param type
         */
        private TransitionEventType(String type) {
            this.type = type;
        }

        @Override
        public String asString() {
            return type;
        }

    }

    public TransitionEvent(Transition source, EventType type) {
        super(source, type);
    }

}
